//活动数据接口
import axios from 'axios'
import config from './config.js'
function activityData() {
    return axios({
        method: 'get',
        baseURL: config.host,
        url: '/activity/data',
    })
}

function activtyId(id) {
    return axios({
        method: 'get',
        baseURL: config.host,
        url: '/activity/list',
        params: {
            id
        }
    })
}

//活动报名接口
function apply(id,data) {
    return axios({
        method: 'get',
        baseURL: config.host,
        url: '/activity/apply',
        params: {
            id,
            data
        }
    })
}

//签到接口
function signIn(id,useId, paw) {
    return axios({
        method: 'get',
        baseURL: config.host,
        url: '/activity/signin',
        params: {
            id,
            useId,
            paw
        }
    })
}

//提交活动接口
function addAct(info) {
    return axios({
        method: 'post',
        baseURL: config.host,
        url: '/activity/add',
        data: {
            info
        }
    })
}
export {
    activityData,
    activtyId,
    apply,
    signIn,
    addAct
}